Enumerates variables.
[scope] Enum [Step <stepval>] <variablelist>
Parameters
scope | [optional] The scope the Enum should be placed in, either Local, Global, Dim or none. If none, Dim behavior is used. |
stepval | [optional] The default step is to add 1. Other possible step methods are: *n, +n, -n where n is a whole number. |
variablelist | A list variables to be enumerated. |
Remarks
By default, the first variable will be 0 and the rest will be incremented by 1 from there.
Related
Example
Global Enum $E1VAR1, $E1VAR2, $E1VAR3
MsgBox(4096, "", "Expect 0: " & $E1VAR1)
MsgBox(4096, "", "Expect 1: " & $E1VAR2)
MsgBox(4096, "", "Expect 2: " & $E1VAR3)
Global Enum $E2VAR1 = 10, $E2VAR2, $E2VAR3 = 15
MsgBox(4096, "", "Expect 10: " & $E2VAR1)
MsgBox(4096, "", "Expect 11: " & $E2VAR2)
MsgBox(4096, "", "Expect 15: " & $E2VAR3)
Global Enum Step *2 $E3VAR1, $E3VAR2, $E3VAR3
MsgBox(4096, "", "Expect 1: " & $E3VAR1)
MsgBox(4096, "", "Expect 2: " & $E3VAR2)
MsgBox(4096, "", "Expect 4: " & $E3VAR3)